﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;

namespace WebApplication1.Models
{
    public class Context  : DbContext
    {
        string sqlcon = "Data Source=localhost;Initial Catalog=article;Trusted_Connection=True;";
        //string sqlcon = "Data Source=.;Initial Catalog=article;User Id=sa;Password=111111";
        public Context ()
           : base()
        {
            
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(sqlcon);
        }

        public DbSet<article> articles { get; set; }
    }
}
